package com.luo.auth.pojo;

import java.io.Serializable;

public class TokenObj implements Serializable {
    private static final long serialVersionUID = 3364669651192787356L;
    //用户或者自媒体id
    private Long id;
    
    //来源，0：用户登录，1：自媒体登录
    private Integer source;
    
    //随机生成的uuid
    private String token;
    

    public TokenObj(Long id, Integer source, String token) {
        this.id = id;
        this.source = source;
        this.token = token;
    }
    
    public String getRedisKey() {
		return String.valueOf(this.id) + "-" + String.valueOf(this.source);
	}

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getSource() {
		return source;
	}

	public void setSource(Integer source) {
		this.source = source;
	}

	public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
